version=1.0.0.0
builddate=$(shell date)

OUTDIR=output
SRCDIR = src
LIB2 = ../../lib2-64
PUBLIC = ../../public
INCLUDEDIR=../../include
THIRD=../../third-64

CPPFLAGS+=-g -O3 -Wall -pipe -D_REENTRANT -DVERSION=\""$(version)"\" -DBUILD_DATE=\""$(builddate)"\"
CC= g++

MODULES = HttpServer Thread Common ConfManager WordSeg

INCLUDES=-I$(INCLUDEDIR) \
		-I$(LIB2)/wordseg \
		-I$(LIB2)/ccode/include \
		-I$(LIB2)/dict/include \
		-I$(LIB2)/libcrf/include \
		-I$(LIB2)/others-ex/include \
		-I$(LIB2)/ullib/include \
		-I$(PUBLIC)/odict/output/include \
		-I$(THIRD)/third-64/boost/include \

LIBPATH=-L$(LIB2)/wordseg \
		-L$(LIB2)/others-ex/lib \
		-L$(LIB2)/ullib/lib \
		-L$(LIB2)/dict/lib \
		-L$(LIB2)/ccode/lib \
		-L$(LIB2)/libcrf/lib \
		-L$(PUBLIC)/odict/output \

LDFLAGS=-lsegment \
		-lodict \
		-lulccode \
		-lcrf \
		-luldict \
		-lullib \
		-lullib_ex \
		-lcrypto -lm -lz -lpthread \

%.o: %.cpp $(wildcard  $(INCLUDEDIR)/*.h)
	@$(CC) $(CPPFLAGS) $(INCLUDES) -c $< -o $@